Coordina::Application.routes.draw do
  
  match 'documents/delete/:document_id' => 'documents#destroy', :as => :delete_document
  
  resources :documents
  resources :accounts
  resources :categories

  get 'home' => 'home#index', :as => :home
  get 'frente' => 'frente#index', :as => :frente
  get 'proyectos' => 'proyectos#index', :as => :proyectos
  get 'agendas' => 'agendas#index', :as => :agendas
  get 'calendar' => 'agendas#calendar', :as => :calendar
  get 'dictamenes' => 'dictamenes#index', :as => :dictamenes
  get 'mociones' => 'mociones#index', :as => :mociones
  get 'transcripciones' => 'transcripciones#index', :as => :transcripciones
  get 'exposiciones' => 'exposiciones#index', :as => :exposiciones
  get 'reportes' => 'reportes#index', :as => :reportes
  get 'events' => 'documents#events', :as => :events
  get 'content' => 'content#index', :as => :content
  post 'content/save/:category_id' => 'content#save', :as => :content_save
  get 'documents/permissions/:id' => 'documents#permissions', :as => :permissions
  match 'documents/permissions/save' => 'documents#savepermissions', :as => :savepermissions
  
  post 'login' => 'accounts#login'
  get  'logout' => 'accounts#logout', :as => :logout  
  root :to => 'accounts#login', :as => :login
end
